package com.qfjy.LiHuanHuan;

/**
 * @author:lihunahuan
 * @date:2022/9/13 17:59
 * @version: 1.0
 */

import java.util.ArrayList;

/**
 * 步骤二
 * 使用 Employee 类来创建和打印员工的层次结构
 */
public class DemoEmployee {
    public static void main(String[] args) {

        ArrayList<Employee> list = new ArrayList<>();

        Employee emp1 = new Employee(1001,"员工名01",21,1001.00);
        Employee emp2 = new Employee(1002, "员工名02", 22, 1002.00);
        Employee emp3 = new Employee(1003, "员工名03", 23, 1003.00);

        list.add(emp1);
        list.add(emp2);
        list.add(emp3);

        list.forEach(System.out::println);
    }
}
